<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pango Interaction</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Input-Devices.html" title="Input Devices">
<link rel="next" href="gdk-Cairo-Interaction.html" title="Cairo Interaction">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="api-index-full.html" title="Index of all symbols">
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Input-Devices.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Cairo-Interaction.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk-Pango-Interaction.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#gdk-Pango-Interaction.description" class="shortcut">Description</a>
                 | 
                <a href="#gdk-Pango-Interaction.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#gdk-Pango-Interaction.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Pango-Interaction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-Pango-Interaction.top_of_page"></a>Pango Interaction</span></h2>
<p>Pango Interaction — Using Pango in GDK</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk-Pango-Interaction.synopsis"></a><h2>Synopsis</h2>
<a name="GdkPangoRenderer"></a><pre class="synopsis">

#include &lt;gdk/gdk.h&gt;

                    <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer-struct" title="GdkPangoRenderer">GdkPangoRenderer</a>;
                    <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRendererClass" title="GdkPangoRendererClass">GdkPangoRendererClass</a>;
<a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
>PangoRenderer</a> *     <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-new" title="gdk_pango_renderer_new ()">gdk_pango_renderer_new</a>              (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);
<a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
>PangoRenderer</a> *     <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-get-default" title="gdk_pango_renderer_get_default ()">gdk_pango_renderer_get_default</a>      (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);
void                <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-drawable" title="gdk_pango_renderer_set_drawable ()">gdk_pango_renderer_set_drawable</a>     (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);
void                <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-gc" title="gdk_pango_renderer_set_gc ()">gdk_pango_renderer_set_gc</a>           (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);
void                <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-stipple" title="gdk_pango_renderer_set_stipple ()">gdk_pango_renderer_set_stipple</a>      (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#PangoRenderPart"
>PangoRenderPart</a> part,
                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap">GdkBitmap</a> *stipple);
void                <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-override-color" title="gdk_pango_renderer_set_override_color ()">gdk_pango_renderer_set_override_color</a>
                                                        (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#PangoRenderPart"
>PangoRenderPart</a> part,
                                                         const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor">GdkColor</a> *color);
<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *      <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-context-get" title="gdk_pango_context_get ()">gdk_pango_context_get</a>               (void);
<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *      <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-context-get-for-screen" title="gdk_pango_context_get_for_screen ()">gdk_pango_context_get_for_screen</a>    (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);
void                <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-context-set-colormap" title="gdk_pango_context_set_colormap ()">gdk_pango_context_set_colormap</a>      (<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *context,
                                                         <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap">GdkColormap</a> *colormap);
                    <a class="link" href="gdk-Pango-Interaction.html#GdkPangoAttrEmbossed" title="GdkPangoAttrEmbossed">GdkPangoAttrEmbossed</a>;
                    <a class="link" href="gdk-Pango-Interaction.html#GdkPangoAttrEmbossColor" title="GdkPangoAttrEmbossColor">GdkPangoAttrEmbossColor</a>;
                    <a class="link" href="gdk-Pango-Interaction.html#GdkPangoAttrStipple" title="GdkPangoAttrStipple">GdkPangoAttrStipple</a>;
<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-attr-emboss-color-new" title="gdk_pango_attr_emboss_color_new ()">gdk_pango_attr_emboss_color_new</a>     (const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor">GdkColor</a> *color);
<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-attr-embossed-new" title="gdk_pango_attr_embossed_new ()">gdk_pango_attr_embossed_new</a>         (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> embossed);
<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-attr-stipple-new" title="gdk_pango_attr_stipple_new ()">gdk_pango_attr_stipple_new</a>          (<a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap">GdkBitmap</a> *stipple);
<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion">GdkRegion</a> *         <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-layout-get-clip-region" title="gdk_pango_layout_get_clip_region ()">gdk_pango_layout_get_clip_region</a>    (<a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
>PangoLayout</a> *layout,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> x_origin,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> y_origin,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *index_ranges,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> n_ranges);
<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion">GdkRegion</a> *         <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-layout-line-get-clip-region" title="gdk_pango_layout_line_get_clip_region ()">gdk_pango_layout_line_get_clip_region</a>
                                                        (<a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayoutLine"
>PangoLayoutLine</a> *line,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> x_origin,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> y_origin,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *index_ranges,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> n_ranges);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="gdk-Pango-Interaction.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
>PangoRenderer</a>
         +----GdkPangoRenderer
</pre>
</div>
<div class="refsect1" lang="en">
<a name="gdk-Pango-Interaction.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer--screen" title='The "screen" property'>screen</a>"                   <a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a>*            : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" lang="en">
<a name="gdk-Pango-Interaction.description"></a><h2>Description</h2>
<p>
Pango is the text layout system used by GDK and GTK+. The functions
and types in this section are used to render Pango objects to GDK.
drawables, and also extend the set of Pango attributes to include
stippling and embossing.
</p>
<p>
Creating a <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> object is the first step in rendering text,
and requires getting a handle to a <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a>. For GTK+ programs,
you'll usually want to use <a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-get-pango-context"
><code class="function">gtk_widget_get_pango_context()</code></a>, or
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-create-pango-layout"
><code class="function">gtk_widget_create_pango_layout()</code></a>, rather than using the lowlevel
<a class="link" href="gdk-Pango-Interaction.html#gdk-pango-context-get-for-screen" title="gdk_pango_context_get_for_screen ()"><code class="function">gdk_pango_context_get_for_screen()</code></a>. Once you have a <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a>, you
can set the text and attributes of it with Pango functions like
<a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#pango-layout-set-text"
><code class="function">pango_layout_set_text()</code></a> and get its size with <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#pango-layout-get-size"
><code class="function">pango_layout_get_size()</code></a>.
(Note that Pango uses a fixed point system internally, so converting
between Pango units and pixels using PANGO_SCALE or the <code class="function">PANGO_PIXELS()</code> macro.)
</p>
<p>
Rendering a Pango layout is done most simply with <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout" title="gdk_draw_layout ()"><code class="function">gdk_draw_layout()</code></a>;
you can also draw pieces of the layout with <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout" title="gdk_draw_layout ()"><code class="function">gdk_draw_layout()</code></a> or
<a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-glyphs" title="gdk_draw_glyphs ()"><code class="function">gdk_draw_glyphs()</code></a>. <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> is a subclass of <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a>
that is used internally to implement these functions. Using it
directly or subclassing it can be useful in some cases. See the
<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> documentation for details.
</p>
<div class="example">
<a name="rotated-example"></a><p class="title"><b>Example 8. Using <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> to draw transformed text</b></p>
<div class="example-contents"><pre class="programlisting">
#define RADIUS 100
#define N_WORDS 10
#define FONT "Sans Bold 18"
GdkScreen *screen = gdk_drawable_get_screen (drawable);
PangoRenderer *renderer;
GdkGC *gc;
PangoMatrix matrix = PANGO_MATRIX_INIT;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *desc;
double device_radius;
int width, height;
int i;
/* Get the default renderer for the screen, and set it up for drawing  */
renderer = gdk_pango_renderer_get_default (screen);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
gc = gdk_gc_new (drawable);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
/* Set up a transformation matrix so that the user space coordinates for
 * where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
 * We first center, then change the scale */
gdk_drawable_get_size (drawable, &amp;width, &amp;height);
device_radius = MIN (width, height) / 2.;
pango_matrix_translate (&amp;matrix,
                        device_radius + (width - 2 * device_radius) / 2,
                        device_radius + (height - 2 * device_radius) / 2);
pango_matrix_scale (&amp;matrix, device_radius / RADIUS, device_radius / RADIUS);
/* Create a PangoLayout, set the font and text */
context = gdk_pango_context_get_for_screen (screen);
layout = pango_layout_new (context);
pango_layout_set_text (layout, "Text", -1);
desc = pango_font_description_from_string (FONT);
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
/* Draw the layout N_WORDS times in a circle */
for (i = 0; i &lt; N_WORDS; i++)
  {
    GdkColor color;
    PangoMatrix rotated_matrix = matrix;
    int width, height;
    double angle = (360. * i) / N_WORDS;
    /* Gradient from red at angle == 60 to blue at angle == 300 */
    color.red   = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
    color.green = 0;
    color.blue  = 65535  - color.red;
    gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
                                           PANGO_RENDER_PART_FOREGROUND, &amp;color);
    pango_matrix_rotate (&amp;rotated_matrix, angle);
    pango_context_set_matrix (context, &amp;rotated_matrix);
    /* Inform Pango to re-layout the text with the new transformation matrix */
    pango_layout_context_changed (layout);
    pango_layout_get_size (layout, &amp;width, &amp;height);
    pango_renderer_draw_layout (renderer, layout,
                                - width / 2, - RADIUS * PANGO_SCALE);
  }
/* Clean up default renderer, since it is shared */
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
                                       PANGO_RENDER_PART_FOREGROUND, NULL);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
/* free the objects we created */
g_object_unref (layout);
g_object_unref (context);
g_object_unref (gc);
</pre></div>
</div>
<br class="example-break"><div class="figure">
<a name="id2695864"></a><p class="title"><b>Figure 1. Output of <a class="xref" href="gdk-Pango-Interaction.html#rotated-example" title="Example 8. Using ??? to draw transformed text">Example 8, “Using ??? to draw transformed text”</a></b></p>
<div class="figure-contents"><div><img src="rotated-text.png" alt="Output of"></div></div>
</div>
<br class="figure-break">
</div>
<div class="refsect1" lang="en">
<a name="gdk-Pango-Interaction.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="GdkPangoRenderer-struct"></a><h3>GdkPangoRenderer</h3>
<pre class="programlisting">typedef struct _GdkPangoRenderer GdkPangoRenderer;</pre>
<p>
<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> is a subclass of <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a> used for rendering
Pango objects into GDK drawables. The default renderer for a particular
screen is obtained with <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-get-default" title="gdk_pango_renderer_get_default ()"><code class="function">gdk_pango_renderer_get_default()</code></a>; Pango
functions like <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#pango-renderer-draw-layout"
><code class="function">pango_renderer_draw_layout()</code></a> and
<a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#pango-renderer-draw-layout-line"
><code class="function">pango_renderer_draw_layout_line()</code></a> are then used to draw objects with
the renderer.
</p>
<p>
In most simple cases, applications can just use <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout" title="gdk_draw_layout ()"><code class="function">gdk_draw_layout()</code></a>, and
don't need to directly use <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> at all. Using the
<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> directly is most useful when working with a
transformation such as a rotation, because the Pango drawing functions
take user space coordinates (coordinates before the transformation)
instead of device coordinates.
</p>
<p>
In certain cases it can be useful to subclass <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>. Examples
of reasons to do this are to add handling of custom attributes by
overriding 'prepare_run' or to do custom drawing of embedded objects
by overriding 'draw_shape'.</p>
<p>
</p>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GdkPangoRendererClass"></a><h3>GdkPangoRendererClass</h3>
<pre class="programlisting">typedef struct {
} GdkPangoRendererClass;
</pre>
<p>
<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a> is the class structure for <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>.</p>
<p>
</p>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-new"></a><h3>gdk_pango_renderer_new ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
>PangoRenderer</a> *     gdk_pango_renderer_new              (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);</pre>
<p>
Creates a new <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a> for <em class="parameter"><code>screen</code></em>. Normally you can use the
results of <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-get-default" title="gdk_pango_renderer_get_default ()"><code class="function">gdk_pango_renderer_get_default()</code></a> rather than creating a new
renderer.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> a <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly created <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a>. Free with <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-get-default"></a><h3>gdk_pango_renderer_get_default ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
>PangoRenderer</a> *     gdk_pango_renderer_get_default      (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);</pre>
<p>
Gets the default <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a> for a screen. This default renderer
is shared by all users of the display, so properties such as the color
or transformation matrix set for the renderer may be overwritten
by functions such as <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout" title="gdk_draw_layout ()"><code class="function">gdk_draw_layout()</code></a>.
</p>
<p>
Before using the renderer, you need to call <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-drawable" title="gdk_pango_renderer_set_drawable ()"><code class="function">gdk_pango_renderer_set_drawable()</code></a>
and <a class="link" href="gdk-Pango-Interaction.html#gdk-pango-renderer-set-gc" title="gdk_pango_renderer_set_gc ()"><code class="function">gdk_pango_renderer_set_gc()</code></a> to set the drawable and graphics context
to use for drawing.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> a <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the default <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html"
><span class="type">PangoRenderer</span></a> for <em class="parameter"><code>screen</code></em>. The
 renderer is owned by GTK+ and will be kept around until the
 screen is closed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-set-drawable"></a><h3>gdk_pango_renderer_set_drawable ()</h3>
<pre class="programlisting">void                gdk_pango_renderer_set_drawable     (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);</pre>
<p>
Sets the drawable the renderer draws to.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_renderer</code></em> :</span></p></td>
<td> a <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the new target drawable, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-set-gc"></a><h3>gdk_pango_renderer_set_gc ()</h3>
<pre class="programlisting">void                gdk_pango_renderer_set_gc           (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre>
<p>
Sets the GC the renderer draws with. Note that the GC must not be
modified until it is unset by calling the function again with
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> for the <em class="parameter"><code>gc</code></em> parameter, since GDK may make internal copies
of the GC which won't be updated to follow changes to the
original GC.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_renderer</code></em> :</span></p></td>
<td> a <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td> the new GC to use for drawing, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-set-stipple"></a><h3>gdk_pango_renderer_set_stipple ()</h3>
<pre class="programlisting">void                gdk_pango_renderer_set_stipple      (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#PangoRenderPart"
>PangoRenderPart</a> part,
                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap">GdkBitmap</a> *stipple);</pre>
<p>
Sets the stipple for one render part (foreground, background, underline,
etc.) Note that this is overwritten when iterating through the individual
styled runs of a <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> or <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayoutLine"
><span class="type">PangoLayoutLine</span></a>. This function is thus
only useful when you call low level functions like <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#pango-renderer-draw-glyphs"
><code class="function">pango_renderer_draw_glyphs()</code></a>
directly, or in the 'prepare_run' virtual function of a subclass of
<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_renderer</code></em> :</span></p></td>
<td> a <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
<td> the part to render with the stipple
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stipple</code></em> :</span></p></td>
<td> the new stipple value.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-renderer-set-override-color"></a><h3>gdk_pango_renderer_set_override_color ()</h3>
<pre class="programlisting">void                gdk_pango_renderer_set_override_color
                                                        (<a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer">GdkPangoRenderer</a> *gdk_renderer,
                                                         <a
href="/usr/share/gtk-doc/html/pango/PangoRenderer.html#PangoRenderPart"
>PangoRenderPart</a> part,
                                                         const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor">GdkColor</a> *color);</pre>
<p>
Sets the color for a particular render part (foreground,
background, underline, etc.), overriding any attributes on the layouts
renderered with this renderer.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_renderer</code></em> :</span></p></td>
<td> a <a class="link" href="gdk-Pango-Interaction.html#GdkPangoRenderer"><span class="type">GdkPangoRenderer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
<td> the part to render to set the color of
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td> the color to use, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> to unset a previously
        set override color.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-context-get"></a><h3>gdk_pango_context_get ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *      gdk_pango_context_get               (void);</pre>
<p>
Creates a <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a> for the default GDK screen.
</p>
<p>
The context must be freed when you're finished with it.
</p>
<p>
When using GTK+, normally you should use <a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-get-pango-context"
><code class="function">gtk_widget_get_pango_context()</code></a>
instead of this function, to get the appropriate context for
the widget you intend to render text onto.
</p>
<p>
The newly created context will have the default font options (see
<a
href="/usr/share/gtk-doc/html/cairo/cairo-font-options.html#cairo-font-options-t"
><span class="type">cairo_font_options_t</span></a>) for the default screen; if these options
change it will not be updated. Using <a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-get-pango-context"
><code class="function">gtk_widget_get_pango_context()</code></a>
is more convenient if you want to keep a context around and track
changes to the screen's font rendering settings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a> for the default display
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-context-get-for-screen"></a><h3>gdk_pango_context_get_for_screen ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *      gdk_pango_context_get_for_screen    (<a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen);</pre>
<p>
Creates a <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a> for <em class="parameter"><code>screen</code></em>.
</p>
<p>
The context must be freed when you're finished with it.
</p>
<p>
When using GTK+, normally you should use <a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-get-pango-context"
><code class="function">gtk_widget_get_pango_context()</code></a>
instead of this function, to get the appropriate context for
the widget you intend to render text onto.
</p>
<p>
The newly created context will have the default font options
(see <a
href="/usr/share/gtk-doc/html/cairo/cairo-font-options.html#cairo-font-options-t"
><span class="type">cairo_font_options_t</span></a>) for the screen; if these options
change it will not be updated. Using <a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html#gtk-widget-get-pango-context"
><code class="function">gtk_widget_get_pango_context()</code></a>
is more convenient if you want to keep a context around and track
changes to the screen's font rendering settings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td> the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for which the context is to be created.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a> for <em class="parameter"><code>screen</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-context-set-colormap"></a><h3>gdk_pango_context_set_colormap ()</h3>
<pre class="programlisting">void                gdk_pango_context_set_colormap      (<a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
>PangoContext</a> *context,
                                                         <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap">GdkColormap</a> *colormap);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_pango_context_set_colormap</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This function used to set the colormap to be used for drawing with
<em class="parameter"><code>context</code></em>. The colormap is now always derived from the graphics
context used for drawing, so calling this function is no longer
necessary.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> a <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#PangoContext"
><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>colormap</code></em> :</span></p></td>
<td> a <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GdkPangoAttrEmbossed"></a><h3>GdkPangoAttrEmbossed</h3>
<pre class="programlisting">typedef struct {
  PangoAttribute attr;
  gboolean embossed;
} GdkPangoAttrEmbossed;
</pre>
<p>
A Pango text attribute containing a embossed bitmap to be used when
rendering the text.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></p></td>
<td>the <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <em class="structfield"><code>embossed</code></em>;</span></p></td>
<td>the embossed bitmap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GdkPangoAttrEmbossColor"></a><h3>GdkPangoAttrEmbossColor</h3>
<pre class="programlisting">typedef struct {
  PangoAttribute attr;
  PangoColor color;
} GdkPangoAttrEmbossColor;
</pre>
<p>
A Pango text attribute specifying the color to emboss text with.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></p></td>
<td>the <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoColor"
>PangoColor</a> <em class="structfield"><code>color</code></em>;</span></p></td>
<td>the color
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GdkPangoAttrStipple"></a><h3>GdkPangoAttrStipple</h3>
<pre class="programlisting">typedef struct {
  PangoAttribute attr;
  GdkBitmap *stipple;
} GdkPangoAttrStipple;
</pre>
<p>
A Pango text attribute containing a stipple bitmap to be used when
rendering the text.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></p></td>
<td>the <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap">GdkBitmap</a> *<em class="structfield"><code>stipple</code></em>;</span></p></td>
<td>the stipple bitmap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-attr-emboss-color-new"></a><h3>gdk_pango_attr_emboss_color_new ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    gdk_pango_attr_emboss_color_new     (const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor">GdkColor</a> *color);</pre>
<p>
Creates a new attribute specifying the color to emboss text with.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td> a GdkColor representing the color to emboss with
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-attr-embossed-new"></a><h3>gdk_pango_attr_embossed_new ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    gdk_pango_attr_embossed_new         (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> embossed);</pre>
<p>
Creates a new attribute flagging a region as embossed or not.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>embossed</code></em> :</span></p></td>
<td> if the region should be embossed
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-attr-stipple-new"></a><h3>gdk_pango_attr_stipple_new ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
>PangoAttribute</a> *    gdk_pango_attr_stipple_new          (<a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap">GdkBitmap</a> *stipple);</pre>
<p>
Creates a new attribute containing a stipple bitmap to be used when
rendering the text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stipple</code></em> :</span></p></td>
<td> a bitmap to be set as stipple
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-layout-get-clip-region"></a><h3>gdk_pango_layout_get_clip_region ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion">GdkRegion</a> *         gdk_pango_layout_get_clip_region    (<a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
>PangoLayout</a> *layout,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> x_origin,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> y_origin,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *index_ranges,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> n_ranges);</pre>
<p>
Obtains a clip region which contains the areas where the given ranges
of text would be drawn. <em class="parameter"><code>x_origin</code></em> and <em class="parameter"><code>y_origin</code></em> are the same position
you would pass to <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout-line" title="gdk_draw_layout_line ()"><code class="function">gdk_draw_layout_line()</code></a>. <em class="parameter"><code>index_ranges</code></em> should contain
ranges of bytes in the layout's text.
</p>
<p>
Note that the regions returned correspond to logical extents of the text
ranges, not ink extents. So the drawn layout may in fact touch areas out of
the clip region.  The clip region is mainly useful for highlightling parts
of text, such as when text is selected.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>layout</code></em> :</span></p></td>
<td> a <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_origin</code></em> :</span></p></td>
<td> X pixel where you intend to draw the layout with this clip
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_origin</code></em> :</span></p></td>
<td> Y pixel where you intend to draw the layout with this clip
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_ranges</code></em> :</span></p></td>
<td> array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_ranges</code></em> :</span></p></td>
<td> number of ranges in <em class="parameter"><code>index_ranges</code></em>, i.e. half the size of <em class="parameter"><code>index_ranges</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a clip region containing the given ranges
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gdk-pango-layout-line-get-clip-region"></a><h3>gdk_pango_layout_line_get_clip_region ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion">GdkRegion</a> *         gdk_pango_layout_line_get_clip_region
                                                        (<a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayoutLine"
>PangoLayoutLine</a> *line,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> x_origin,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> y_origin,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *index_ranges,
                                                         <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> n_ranges);</pre>
<p>
Obtains a clip region which contains the areas where the given
ranges of text would be drawn. <em class="parameter"><code>x_origin</code></em> and <em class="parameter"><code>y_origin</code></em> are the same
position you would pass to <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-layout-line" title="gdk_draw_layout_line ()"><code class="function">gdk_draw_layout_line()</code></a>. <em class="parameter"><code>index_ranges</code></em>
should contain ranges of bytes in the layout's text. The clip
region will include space to the left or right of the line (to the
layout bounding box) if you have indexes above or below the indexes
contained inside the line. This is to draw the selection all the way
to the side of the layout. However, the clip region is in line coordinates,
not layout coordinates.
</p>
<p>
Note that the regions returned correspond to logical extents of the text
ranges, not ink extents. So the drawn line may in fact touch areas out of
the clip region.  The clip region is mainly useful for highlightling parts
of text, such as when text is selected.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
<td> a <a
href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayoutLine"
><span class="type">PangoLayoutLine</span></a> 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_origin</code></em> :</span></p></td>
<td> X pixel where you intend to draw the layout line with this clip
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_origin</code></em> :</span></p></td>
<td> baseline pixel where you intend to draw the layout line with this clip
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_ranges</code></em> :</span></p></td>
<td> array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_ranges</code></em> :</span></p></td>
<td> number of ranges in <em class="parameter"><code>index_ranges</code></em>, i.e. half the size of <em class="parameter"><code>index_ranges</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a clip region containing the given ranges
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="gdk-Pango-Interaction.property-details"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="GdkPangoRenderer--screen"></a><h3>The <code class="literal">"screen"</code> property</h3>
<pre class="programlisting">  "screen"                   <a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a>*            : Read / Write / Construct Only</pre>
<p>the GdkScreen for the renderer.</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>
